﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ECRMS.Biz.Dom;
using ECRMS.Biz;
using System.ServiceModel;
using ECRMS.Common;
using System.ServiceModel.Web;

namespace ECRMS.Service
{
    [ServiceContract]
    public partial interface ICtUsrService
    {
         [OperationContract]
        [return: MessageParameter(Name = "Result")]
        [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped,
            RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        CtServiceResult<CtUser> CtLogin(string username, string password);
    }

    public partial class ECRService : ICtUsrService
    {

        /// <summary>
        /// 客户端登录方法
        /// </summary>
        CtServiceResult<CtUser> ICtUsrService.CtLogin(string username, string password)
        {
            var logic = new CtUserLogic();
            return logic.Login(username, password);
        }
    }
}
